package domain;

import java.net.ConnectException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * This thread will perform an initial sync when run
 *
 * @author ParaSait
 */
public class SynchronizeThread extends Thread {

    private Client client;

    /**
     * Constructor
     *
     * @param client The client that will perform the sync
     */
    public SynchronizeThread(Client client) {
        this.client = client;
    }

    @Override
    public void run() {
        try {
            client.performInitialSync();
        } catch (ConnectException ex) {
            Logger.getLogger(SynchronizeThread.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
